<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>未参合农民档案列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="<%=path%>/css/pintuer.css">
<link rel="stylesheet" href="<%=path%>/css/admin.css">
<link rel="stylesheet" href="<%=path%>/bootstrap/css/bootstrap.min.css">
<link rel="shortcut icon" href="<%=path%>/images/login.jfif">
<script src="<%=path%>/js/jquery.js"></script>
</head>
<body>


	<div class="panel admin-panel">
		<div class="panel-head">
			<strong class="icon-reorder"> 未参合农民档案列表</strong>
		</div>
		<div class="padding border-bottom">
			<ul class="search" style="padding-left:10px;">
				<li>搜索：</li>
				<li>
					<form method="post" action="<%=path%>/member/member_list">
						<input type="text" placeholder="请输入搜索关键字" name="keyword" value=""
							class="input"
							style="width:250px; line-height:17px;display:inline-block" /> <input
							type="submit" class="button border-main icon-search" value="搜索">
						<a class="button border-main" onclick="takePartIn()"><span
							class="icon-edit"  ></span> 缴费</a>
					</form>
				</li>
			</ul>
		</div>
		<table class="table table-hover text-center">
		
			<tr>
				<th width="90" style="text-align:center;">&nbsp;</th>
				<th>家庭编码</th>
				<th>农合证号</th>
				<th>医疗证号</th>
				<th>户内编号</th>
				<th>姓名</th>
				<th>户内关系</th>
				<th>身份证号</th>
				<th>操作</th>

			</tr>
			<c:forEach items="${memberlist}" var="member">
				<tr>
					<td><input type="checkbox" name="rural_ids"
						value="${member.rural_id}" /></td>
					<td>${member.family_id}</td>
					<td>${member.rural_id}</td>
					<td>${member.medical_card_id}</td>
					<td>${member.member_id}</td>
					<td>${member.member_name}</td>
					<td>${member.relation}</td>
					<td>${member.people_id}</td>
					<td><div class="button-group"></div></td>
				</tr>
			</c:forEach>

		</table>
	<div class="form-group">
					<div class="label">
						<label>操作员签名：</label>
					</div>
					<div class="field field-icon-right">
						<input type="text" class="input w50 input input-big" value=""
							name="actor" id="actor_input" placeholder=""
							data-validate="required:" /> <span></span>
						<div class="tips"></div>
					</div>
				</div>
	</div>

</body>
<script type="text/javascript">
	function takePartIn() {
		var rural_ids = [];
		var actor = $("#actor_input").val();
		$('input[name="rural_ids"]:checked').each(function() {
			rural_ids.push($(this).val());
		});
		if(rural_ids.length==0)
		{
		alert("请选择要参合的家庭成员！")
		}else{
                   
                   $.ajax({
		     url:"<%=path%>/part/part_take",
		     type:"post",
		     data:{rural_ids:rural_ids,
		               actor:actor},
		     traditional:true,
		     success:function(res){
	          if(res.code==100){
	             alert("缴费成功!缴费金额为："+JSON.stringify(res.extend.part_money))
	          }else{
	             alert("缴费失败！")
	          }

		     }
		
		})		
		}
		
	}
</script>
</html>
